Jump To:
Technical Q&As
Carbon is a set of APIs that enables C and C++ developers to take advantage of Mac OS X-specific features, including an advanced user interface tool kit, an efficient event-handling mechanism, the Quartz 2D graphics library, and multiprocessing support. In addition, other industry-standard C and C++ APIs are easily available to Carbon developers, providing access to such services as the OpenGL drawing system, the Mach microkernel, and BSD operating-system services. Because Carbon is a collection of C programming interfaces, developers can use virtually any Macintosh C development environment that supports PowerPC to build Carbon applications.

Carbon Resources
A guided introduction and learning path for developers new to Carbon.   Essential information for developers using procedural C.   Descriptions of procedural C programming interface elements.
Document Descriptions
On Off
Display

Sort by
Title
Sorted by
Topic
Sort by
Date
OpenGL Sample Code (HTML)
QA1166: Describes new naming convention for OpenGL sample code
Graphics & Imaging 2004-12-01
OpenGL Texture Sharing Between Contexts (HTML)
QA1031: Describes the process of creating shared OpenGL contexts and sharing textures between these contexts.
Graphics & Imaging 2001-05-01
Parsing the PICT File Format (HTML) ()
Deprecated - QD56: Explains where to find information on the PICT file format and warns against parsing a PICT file.
Graphics & Imaging 1998-02-10
Preserving embedded ICC profiles when using QuickTime Graphics Importer/Exporters (HTML) ()
QA1145: Shows how to preserve the embedded ICC profile when using the QuickTime Graphics Importer/Exporter routines
Graphics & Imaging 2002-09-04
Problem Getting PICTS to Display in Correct Colors (HTML)
Deprecated - QD24: Using a custom color table to get PICTs to display with the right colors in an offscreen GWorld.
Graphics & Imaging 1995-09-15
Problem with PaintRgn on 256-color Screens (HTML)
Deprecated - QD23: PaintRgn with RGBForeColor and transfer mode addOver doesn't return color to original on 256-color-screens.
Graphics & Imaging 1995-09-15
Problems Creating a Mask for a Picture (HTML)
Deprecated - QD27: Demonstrates creating a mask where the mask is 0 for pure white pixels and 1 everywhere else.
Graphics & Imaging 1995-09-15
Problems recording CopyBits into a PICT on Mac OS X 10.2 (HTML) ()
QA1189: Identifies a problem with CopyBits and PICT on Mac OS X 10.2 and gives a simple workaround.
Graphics & Imaging 2002-11-19
QDFlushPortBuffer (HTML) ()
QD65: Describes a possible solution for window update problems under Carbon.
Graphics & Imaging 2000-11-08
QDSwapPort (HTML) ()
QA1128: Explains when to use QDSwapPort.
Graphics & Imaging 2002-11-06
Quartz 2D Interpolation (HTML) ()
QA1186: Explains how to control Quartz 2D's image interpolation.
Graphics & Imaging 2002-10-29
Quartz 2D Thread Safety (HTML) ()
QA1238: Explains the thread-safety issues for the Quartz 2D API.
Graphics & Imaging 2003-02-25
QuickDraw Text Anti-Aliasing using Quartz 2D (HTML) ()
QA1193: Describes APIs added to Mac OS X to allow applications to draw QD text using CG anti-aliasing.
Graphics & Imaging 2002-10-29
Replacing OpenPort in Carbon (HTML) ()
QD66: Discusses a potential crashing problem when Carbonizing code that uses black and white GrafPorts.
Graphics & Imaging 2000-11-08
Saving the current Core Graphics Path (HTML)
QA1056: Explains that the Core Graphics save and restore GState APIs do not affect the path.
Graphics & Imaging 2001-10-02
Setting the preferred CMM programatically? (HTML)
QA1086: Uses the NCMConcatProfileSet structure to specify the CMM to be used to make the CMWorldRef with the NCWConcatColorWorld function.
Graphics & Imaging 2001-10-24
Spooling in or out of CompressPicture or CompressImage (HTML)
Deprecated - QD17: Recommends alternatives to spooling the results of CompressPicture or CompressImage to or from disk.
Graphics & Imaging 1995-09-15
Turning Off Core Graphics Clipping (HTML)
QA1050: Explains how to clear the clipping path for a CGContext.
Graphics & Imaging 2001-07-02
Unexpected CG state changes (HTML)
QA1045: Explains why the Core Graphics drawing state sometimes changes for no apparent reason.
Graphics & Imaging 2001-07-02
Updating OpenGL Contexts (HTML) ()
QA1209: When and why to update an OpenGL context in response to system and user actions.
Graphics & Imaging 2003-06-19
Using Clip Region and Buffer Rectangles with OpenGL Carbon (HTML) ()
QA1222: Shows the basics of using buffer rectangles and clip regions with AGL.
Graphics & Imaging 2002-12-19
Using cmPathBased profile locations on Mac OS X (HTML) ()
QA1203: Shows how to correctly specify cmPath-based profile locations on Mac OS X
Graphics & Imaging 2002-11-06
Using qd and QDGlobals (HTML) ()
Deprecated - QD40: Why a sample program compiled with SC may give the link error: undefined entry qd. Provides a solution.
Graphics & Imaging 1996-02-09
Using Temporary Memory with OpenPicture (HTML)
Deprecated - QD20: Provides several techniques of causing OpenPicture to allocate temporary memory for a picture handle.
Graphics & Imaging 1996-02-01
Why am I drawing directly to the screen? (HTML)
QA1015: Explains why drawing to a window's backbuffer can affect the upper left corner of the screen instead.
Graphics & Imaging 2004-02-19
Window Manager and EraseRect (HTML)
Deprecated - QD26: Why WindowManager causes a flicker using EraseRect and provides a solution for this problem.
Graphics & Imaging 1995-09-15
Adding an automated Window menu to your application (HTML)
QA1080: Explains how to add an automated Window menu to your Carbon application.
Human Interface Toolbox 2001-10-30
Appearance Versions (HTML) ()
TB39: Explains how to retrieve the Appearance Manager version and verify the compatibility with the Mac OS version.
Human Interface Toolbox 2000-07-15
Are the root control, the root view, and the content view the same entity? (HTML) ()
QA1214: Details the differences and similitudes between the root control, the root view, and the content view of windows.
Human Interface Toolbox 2002-11-12
Bypassing AppendMenu's Meta-character Processing (HTML) ()
TB56: Explains how to bypass AppendMenu's meta-character processing and how to use AppendMenuItemText instead.
Human Interface Toolbox 1998-12-22
Can I have parameters of type typeHIRect instead of type typeQDRectangle in my kEventControlBoundsChanged message handler? (HTML) ()
QA1246: Details the automatic coercions between QuickDraw and Quartz types provided by the Carbon Event Parameter accessors.
Human Interface Toolbox 2003-04-03
CGContext parameter missing in my kEventControlDraw event (HTML) ()
QA1212: Explains in which case your kEventControlDraw handler wouldn't receive a CGContext parameter.
Human Interface Toolbox 2002-11-12
Changing Menu Titles (HTML) ()
TB47: Explains how to change a menu's title after its insertion into the menu bar.
Human Interface Toolbox 1998-12-22
Clickable Static Text Item (HTML)
QA1380: Explains how to make a static text item respond to clicks
Human Interface Toolbox 2004-10-05
CreateStaticTextControl fails with paramErr (HTML) ()
QA1211: Explains why CreateStaticTextControl fails with a paramErr in compositing windows and gives a work around.
Human Interface Toolbox 2002-11-12
The Data Browser GetDataBrowserUserState API (HTML) ()
QA1270: Explains a problematic Data Browser API definition and how to work around it.
Human Interface Toolbox 2003-07-22
Do I have to call CreateRootControl after creating my window? (HTML) ()
QA1215: Explains when and when not to call CreateRootControl after creating a window.
Human Interface Toolbox 2002-11-12
Drag Manager: Promising and Tracking (HTML) ()
TB43: Explains why you cannot always obtain the promised flavor data in your drag tracking handler.
Human Interface Toolbox 1998-12-22
Enabling the application menu's "Preferences..." menu item on Mac OS X (HTML)
QA1079: Explains how to enable the application menu's "Preferences..." menu item on Mac OS X.
Human Interface Toolbox 2001-10-30
Enabling the Navigation Services default behavior in its dialogs (HTML)
QA1384: Explains how to enable the default behavior of the Navigation Services dialogs.
Human Interface Toolbox 2004-10-15
Expanding the Set of Menu Item Modifier Keys (HTML) ()
TB53: Explains how to use the shift and option keys with the menu command keys.
Human Interface Toolbox 1998-12-22
Filtering QuickTime media types in Navigation Services (HTML) ()
QA1274: Describes how to filter QuickTime media types in a Navigation Services filter procedure.
Human Interface Toolbox 2003-07-23
Fixing the Layout Binding of the Tab control User Panes (HTML)
QA1161: Describes the Tab control hierarchy and layouts of its panes and provides a fix to a common problem.
Human Interface Toolbox 2004-10-14
HIObjectRegisterSubclass returns paramErr (HTML) ()
QA1213: Explains in which case HIObjectRegisterSubclass would return paramErr and gives a work around.
Human Interface Toolbox 2002-11-12
How can I set the default location with the modern Navigation APIs NavCreatexxx? (HTML) ()
QA1151: Explains how to set the default location with a NavCustomControl call using the kNavCtlSetLocation message in the Event Proc.
Human Interface Toolbox 2002-07-01
How PBDTGetAPPL Chooses Which Copy of an App to Launch (HTML) ()
Deprecated - TB19: Explains how PBDTGetAppl() chooses which application copy to launch, and how to deal with the trash.
Human Interface Toolbox 1996-05-14
The Initialize Method of Multi-fragment Contextual Menu Plug-ins (HTML) ()
TB60: Explains how to deal with multiple Contextual Menu plug-ins code fragments.
Human Interface Toolbox 1999-04-05
Installing input methods on Mac OS X (HTML)
QA1054: Describes how to install and use input methods on Mac OS X.
Human Interface Toolbox 2001-09-14
The intermittent behavior of SetDialogItemText (HTML)
Deprecated - QA1082: Explains why SetDialogItemText may seem to not work correctly if you have embedding turned on.
Human Interface Toolbox 2001-10-30
Managing custom drawing code in a compositing world (HTML)
QA1162: Explains why any custom drawing code must be handled by the kEventControlDraw handler of a custom HIView
Human Interface Toolbox 2004-10-14
Menus & Hardware Accelerated OpenGL under Mac OS 9 Carbon (HTML)
QA1042: Explains how to handle correctly Mac OS 9 menus when there is hardware accelerated OpenGL blitting.
Human Interface Toolbox 2001-07-10
Moving the Menu Bar (HTML) ()
Deprecated - TB54: Describes how to move the menubar to another Macintosh Display and why this move is unadvisable.
Human Interface Toolbox 1998-12-22
Multiple Resources with the Same Type and ID (HTML) ()
TB30: Explains why Resource IDs should be unique within a given resource type within a given resource file.
Human Interface Toolbox 1996-11-27
My custom item dismisses my Navigation Services dialog (HTML)
QA1381: Gives a workaround for dismissive clicks on items in the custom area of Navigation Services dialogs.
Human Interface Toolbox 2004-11-22
My ListBox control works fine on Mac OS X but I get a crash on Mac OS 9 when I click in the scrollbar (HTML) ()
QA1156: Explains the requirements for the use of the Listbox Control on Mac OS 9 and Mac OS X.
Human Interface Toolbox 2002-07-12
Notifying the Finder of changed or newly created files (HTML) ()
QA1260: Recommended approach to notifying the Finder to update its open windows of a file creation or change.
Human Interface Toolbox 2003-04-15
Pop-up Menu CDEFs: The Real Story (HTML) ()
TB42: Explains why you should never allow the pop-up menu CDEFs to create a menu for you.
Human Interface Toolbox 1998-07-30
Private HITheme APIs in Mac OS X 10.2 should not be called (HTML)
QA1377: Explains why weak-linked API common runtime check is not good enough for the HITheme APIs.
Human Interface Toolbox 2004-10-27
Process Carbon Events Not Delivered in 10.2 (HTML) ()
QA1181: Work around for a bug in Mac OS X 10.2 that prevents the delivery of process Carbon events.
Human Interface Toolbox 2002-08-27
QDFlushPortBuffer (HTML) ()
QD65: Describes a possible solution for window update problems under Carbon.
Human Interface Toolbox 2000-11-08
Resource forks in Mach-O binaries (HTML) ()
QA1175: Advises against using resource forks in Mach-O binaries.
Human Interface Toolbox 2002-08-07
SetFontInfoForSelection incorrect prototype (HTML)
QA1375: Describes the incorrect prototyping of the SetFontInfoForSelection API and gives a workaround.
Human Interface Toolbox 2004-10-04
Setting a Control's Variant Field (HTML) ()
Deprecated - TB63: Details how to change the variant of a custom control after creating the control.
Human Interface Toolbox 1999-05-03
Setting a UserPane's feature (HTML) ()
TB64: Explains how to set up the control attributes when creating controls, and UserPanes in particular.
Human Interface Toolbox 1999-09-27
Styled Custom Dialog Items Under Nav Services (HTML) ()
TB58: Describes how to customize the font characteristics of custom items in a NavPutFile dialog.
Human Interface Toolbox 1999-01-11
Using Navigation Services to filter QuickTime files (HTML) ()
QA1152: Using the CanQuickTimeOpenFile function in a Navigation Services filter to display files that QuickTime can open.
Human Interface Toolbox 2002-07-15
Using the Wide Routines in <FixMath.h> (HTML)
TB14: Details the Wide routines listed in the FixMath.h header (WideDivide, WideCompare, WideBitShift, WideShift, etc.).
Human Interface Toolbox 1995-06-01
What is the minimal set of Carbon Events I need to override in order to implement a simple custom push button? (HTML) ()
QA1210: Details the minimal set of Carbon Events needed to implement a simple custom push button HIView.
Human Interface Toolbox 2002-11-12
Why doesn't my Scrolling Text Box control work in a compositing window? (HTML)
QA1324: Explains why some older controls do not function properly in compositing windows and points to a replacement.
Human Interface Toolbox 2003-11-13
Why isn't my edit text box in my Navigation dialog's custom area working on 10.3? (HTML)
QA1315: Explains a bug in the Mac OS X 10.3 Navigation Services Custom Area involving the EditText and its work around.
Human Interface Toolbox 2003-10-28
Why isn't my Static Text Control deactivating when my other controls are? (HTML) ()
QA1125: Explains why a Static Text Control is not deactivating when the other controls are.
Human Interface Toolbox 2002-03-11
X11 FAQ (HTML) ()
QA1232: Frequently Asked Questions about using Apple's X Window System (X11) implementation.
Human Interface Toolbox 2003-11-17
Calling AppleScript from an Application (HTML)
QA1026: Describes how to call an AppleScript from an application written in C.
Interapplication Communication 2001-04-10
Deselecting Icons in the Finder (HTML) ()
IC04: Shows how to programmatically deselect icons in the Finder.
Interapplication Communication 1997-07-11
Installing input methods on Mac OS X (HTML)
QA1054: Describes how to install and use input methods on Mac OS X.
Interapplication Communication 2001-09-14
Notifying the Finder of changed or newly created files (HTML) ()
QA1260: Recommended approach to notifying the Finder to update its open windows of a file creation or change.
Interapplication Communication 2003-04-15
Retrieving Data from AEDesc Records - do not use the dataHandle field (HTML) ()
QA1139: Describes the correct way to access data stored in AEDesc records.
Interapplication Communication 2002-04-10
Sending an Email (HTML)
QA1084: Shows how to create an email in the user's prefered email application.
Interapplication Communication 2004-11-05
Setting environment variables for user processes (HTML)
QA1067: Tells how to set environment variables for user processes.
Interapplication Communication 2001-10-25
Using AppleScript to send an email with an attachment (HTML) ()
QA1018: Explains how to send an attachment with an email message using an AppleScript.
Interapplication Communication 2002-01-04
Converting to Precomposed Unicode (HTML) ()
QA1235: Describes how to convert a string to precomposed Unicode.
Internationalization 2003-02-07
Getting a Packet Trace (HTML) ()
QA1176: Lists tools available for looking at the network packets on the wire.
Internet & Web 2004-07-13
Sending an Email (HTML)
QA1084: Shows how to create an email in the user's prefered email application.
Internet & Web 2004-11-05
Avoiding Pauses When Looping Audio files with QuickTime (HTML)
QA1371: Demonstrates how to avoid pauses when looping audio files with QuickTime
Music & Audio 2004-09-08
Capturing Speech Manager Output (HTML) ()
Deprecated - SND15: Capturing the output from the Speech Synthesis Manager to a file.
Music & Audio 1998-05-18
Core Audio & Xcode - Ensuring the latest Core Audio Headers are installed (HTML)
QA1386: Describes how to ensure you're working with the latest Core Audio Header files with Xcode.
Music & Audio 2005-01-18
MACE Restrictions (HTML) ()
Deprecated - SND16: MACE algorithms only support the compression of 8-bit offset binary sound.
Music & Audio 1999-06-08
Making Input Gain Setting Changes (HTML) ()
Deprecated - SND01: Changing the input gain setting on older Power Macs before recording.
Music & Audio 1996-06-01
Recording Compressed Sounds (HTML) ()
Deprecated - SND14: Sound Manager and sound input driver compression options are limited to allow interrupt time recording.
Music & Audio 1998-04-12
Selecting a specific sound input source (HTML) ()
Deprecated - SND10: Using the sound input driver to select specific sound input sources.
Music & Audio 1998-01-16
Setting Audio Input Gain (HTML) ()
Deprecated - SND11: Setting audio input gain under Mac OS 8.1.
Music & Audio 1998-02-10
siActive Channels Unsupported on Some Power Macs (HTML) ()
Deprecated - SND03: siActive Channels is unsupported on some older PowerMacs (siUnknownInfoType returned by SPBGetDeviceInfo).
Music & Audio 1996-06-01
siMonitorSource Selector (HTML) ()
Deprecated - SND13: Using the sound output siMonitorAvailable, and siMonitorSource selectors.
Music & Audio 1998-04-12
siOSTypeInput Selectors (HTML) ()
Deprecated - SND12: The use of siOSTypeInputSource, and siOSTypeInputAvailable selectors and extracting the siOSTypeInputAvailable OSTypes returned.
Music & Audio 1998-04-12
siOSTypeInputAvailable Format (HTML) ()
Deprecated - SND09: The format of the data returned by the siOSTypeInputAvailable selector is SoundInfoList.
Music & Audio 1998-01-16
Synchronizing Sounds to Video (HTML) ()
Deprecated - SND19: Enabling regular sound callbacks under Mac OS 9 and Sound Manager 4.0.
Music & Audio 1999-10-05
Synchronous SysBeep (HTML) ()
Deprecated - SND18: Obtaining a synchronous SysBeep with Sound Manager 3.1.
Music & Audio 1999-10-05
Using Sound control panel to configure the sound input settings (HTML) ()
SND17: Under Mac OS 9.0, configuring sound input settings isn't possible after application launch.
Music & Audio 1999-10-05
68K Open Transport Code on Power Macintoshes (HTML)
Deprecated - NW48: Explains why running Open Transport 68K code on a PowerPC may not always work.
Networking 1997-03-14
Aborting a OTConnect in Progress (HTML)
Deprecated - NW29: Describes the proper way to abort OTConnect, and why after calling OTSndDisconnect you may receive "kOTOutStateErr".
Networking 1996-05-14